#include "climbStairs.h"

int climbStairs(int n)
{
	int scroll[3] = { 1, 1, 2 };
	
	if (n <= 2)
	{
		return scroll[n];
	}

	for (int i = 3; i <= n; i++)
	{
		scroll[0] = scroll[1];
		scroll[1] = scroll[2];
		scroll[2] = scroll[0] + scroll[1];
	}


	return scroll[2];
}
